<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<title>{%$LCMX.touch_name%}</title>
<link type="text/css" rel="stylesheet" href="{%$URL%}style.css">
<script src="{%$URL%}js/jquery-1.9.0.min.js"></script>
<script src="{%$URL%}js/jquery.touchslider.js"></script>
<script src="{%$URL%}js/js.js"></script>
<script type="text/javascript">
$(function(){
	$("#gengduo_button").click(function(){
		var num=4;//显示个数
		var page=$("#gengduo_button").attr('page');//第几个分页
		var nodata=$("#gengduo_button").attr('nodata');//判断是否有数据
		if(page){
			page=parseInt(page);
			}else{
				page=1;
				}
		var type='{%$smarty.get.c_id%}';//新闻所属分类
		var lanmu='{%$smarty.get.lanmu%}';//新闻所属栏目
		//$("#test").text("栏目:"+lanmu+"数量:"+num+"类型:"+type+"分页:"+page);
		if(lanmu){
			if(nodata!=="no"){
				$(document.body).append('<div class="spinner"><div class="double-bounce1"></div><div class="double-bounce2"></div></div>');
				$.post("action/products_list_ajax_html5.php",{products_num:num,products_page:page,products_type:type,products_lanmu:lanmu},function(data){
					if(data){
						$(".spinner").remove();
						if(data=="2"){
							alert("服务器错误，请稍后重试！");
							}else{
								if(data=="1"){
									alert("没有更多数据了！");
									$("#gengduo_button").attr('nodata','no');
									}else{
										$(".products_list").append(data);
										page=page+1;
										$("#gengduo_button").attr('page',page);
										}
								}
						}else{
							alert("没有更多数据了！")
							}
					})
					}else{
						alert("没有更多数据了！");
						}
			}else{
				alert("请求参数不正确！");
				}
		})
})
</script>
</head>

<body>
<div class="box_mainBody">
  <div class="box_main">{%include file="index-head.htm"%}
    <div id="ceng" style="display: none; width: 100%; height: 100%; z-index: 100; position: absolute; top: 0; right: 0; bottom: 0;">
      <div id="close" style="width: 55%; background: #444; height: 100%; float: left; background-color: rgba(0, 0, 0, 0.5)"><img src="{%$URL%}img/close.png" style="padding: 15px"></div>
      <div style="width: 45%; background: #005dcc; height: 100%; float: left;" class="type">
        <ul>
          {%lcmx_3g_products_type set="列表名:productstype,所属栏目:GET[lanmu]"%} {%foreach
          from=$productstype item=list%}
          <li><a href="index.php?p=products_list&c_id={%$list.c_id%}">{%$list.c_title%}</a></li>
          {%/foreach%}
        </ul>
      </div>
    </div>
    <article>
      <div class="sub_title"><a href=""><span class="title">首页 > {%$LCMX.lanmu_name%}</span></a></div>
      <section class="products_list"> {%lcmx_3g_products_list set="列表名:products,显示数目:4,标题长度:20,类别:GET[c_id],栏目:GET[lanmu],分页显示:1"%}
        {%if $products %} {%foreach from=$products item=list%}
        <article>
          <div class="img"><a href="index.php?p=products_show&id={%$list.id%}"><img src="{%$list.big_pic%}"></a></div>
          <p class="h9">{%$list.title%}</p>
          <div class="yijiancon">
            <div class="yijian6"><a href="index.php?p=products_show&id={%$list.id%}">查看详情</a></div>
            <div style="width: 10%"></div>
            <div class="yijian5"><a href="tel:13466877905">一键短信</a></div>
          </div>
        </article>
        {%/foreach%}
        {%/if%} </section>
      <div class="sub_more">
        <input name="更多" type="button" id="gengduo_button" page="2" value="显示更多">
      </div>
    </article>
    <!--一键沟通--> {%include file="yijian.htm"%} <!--一键沟通结束--> 
    {%include file="foot.htm"%}</div>
</div>
</body>
</html>
